Seamless switching between radio and local media

ABSTRACT

Systems and methods are provided for seamlessly switching media playback between a media broadcast, such as a radio broadcast, and media from a local media library. When an electronic device determines that an upcoming media item in a media broadcast is not of interest to a user, the electronic device can switch playback from the media stream to a media item from the electronic device local library. The selected local media item can be related to a previously broadcast media item to ensure continuity in the user&#39;s listening or viewing experience. The electronic device can switch away from the local media item and return to the media stream when the media stream again broadcasts media items or segments of interest to the user.

FIELD OF THE INVENTION

This relates to seamlessly switching between the playback of mediabroadcasts and locally stored media in a single electronic device. Inparticular, this relates to switching back and forth from media itemsreceived as part of a broadcast stream, such as a radio stream, andmedia items locally stored in memory of an electronic device.

BACKGROUND OF THE INVENTION

Using a radio system, a user can receive radio waves broadcast from aradio station and provide an audio output associated with the receivedradio waves. Similarly, an electronic device can use communicationscircuitry to receive media broadcasts from non-radio media or contentsources. The content of a particular radio broadcast, or more generallyof a media broadcast, can vary with time. For example, a media broadcastcan include a succession of different media items (e.g., differentsongs). As another example, a media broadcast can include a successionof segments (e.g., a succession of conversations or interviews withdifferent guests). As still another example, a media broadcast caninclude content provided by advertisers that is interspersed betweenmedia items.

A user, however, may not be interested in every media item provided aspart of a broadcast stream. For example, a user may not like aparticular song broadcast by a radio station, or may not like aparticular segment of a talk radio station (e.g., the user does not likethe topic or guest of the segment). As another example, a user may notbe interested in content originally generated by sources other than themedia source (e.g., advertisement content). Because the user has nocontrol over the media broadcast, the user can typically only tune to adifferent media broadcast, or listen to or consume the broadcast contentthat is not of interest.

SUMMARY OF THE INVENTION

This is directed to systems, methods, devices and computer readablemedia for seamlessly switching the playback of media between a broadcastmedia stream and media locally available to an electronic device. Forexample, the broadcast stream can include a radio stream provided overany communications network, and the locally available media can includemedia locally stored in memory or storage of the electronic device, ormedia items available as a dedicated unicast stream (e.g., from a hostdevice) to the electronic device.

To allow a user to only consume the media items of interest in a mediabroadcast, the electronic device can determine when an upcomingbroadcast segment or media item is not of interest to the user, andswitch the playback from the media broadcast to media items locallystored on (e.g., stored in memory) or accessible to the electronicdevice (e.g., available as an on-demand stream from the user's hostdevice). The electronic device can identify the current and future mediaitems to be broadcast using any suitable approach. In some embodiments,the electronic device can identify specific media items, broadcastsegments, or broadcast elements from metadata broadcast along with themedia items (e.g., Radio Data System, or RDS data), broadcast listingsor schedules available from or published by one or more media sources,analysis of the audio or video provided by the content source (e.g.,audio analysis to identify a song or voice), or any other approach.

The electronic device can determine which media items are of interest toa user, or are not of interest to the user using any suitable approach.For example, the electronic device can compare media items to a userpreference profile generated for each user of an electronic device. Thepreference profile can include any suitable information, including forexample metadata values describing media items of interest or not ofinterest (e.g., preferred or disliked genres, artists, media types),specific media items (e.g., media items in which the user has indicateda level of interest or disinterest), or any other suitable informationfor determining a user's media interests. The preference profile can begenerated using any suitable approach, including for example monitoringa user's playback history, requesting response to a questionnaire, orany other suitable approach.

When the electronic device determines that a current or upcoming mediaitem in a broadcast stream is not of interest to a user, the electronicdevice can identify an appropriate local media item to play back insteadof the media stream. In some embodiments, the electronic device canapply a relevance algorithm to select a particular media item that is ofinterest to the user. For example, the electronic device can apply therelevance algorithm to the last media item of interest of the mediastream to select a locally stored media item. This may ensure that theuser is provided with a substantially coherent media consumptionexperience.

BRIEF DESCRIPTION OF THE FIGURES

The above and other objects and advantages of the invention will beapparent upon consideration of the following detailed description, takenin conjunction with the accompanying drawings, in which like referencecharacters refer to like parts throughout, and in which:

FIG. 1 is a representation of an illustrative electronic device inaccordance with some embodiments of the present invention;

FIG. 2 is a schematic view of an illustrative electronic device coupledto a host device in accordance with some embodiments of the presentinvention;

FIG. 3 is a schematic view of an illustrative system for providing andreceiving radio broadcasts in accordance with one embodiment of theinvention;

FIG. 4 is a flowchart of an illustrative process for seamlesslyswitching from broadcast media to local media in accordance with oneembodiment of the invention; and

FIG. 5 is a flowchart of an illustrative process for switching mediaplayback from local media to a media broadcast in accordance with oneembodiment of the invention.

DETAILED DESCRIPTION OF THE INVENTION

Using an electronic device with communications circuitry, a user cantune to and receive broadcast streams provided by media or contentsources. For example, a user can direct an electronic device radio tunerto tune to a particular radio station. The radio station, or other mediaor content source can provide a media broadcast that includes differentmedia items. For example, a broadcast can include several songs that areplayed back consecutively. As another example, a broadcast can includeseveral talk segments each featuring different guests or hosts, orsegments discussing different topics. As still another example, abroadcast can include a variety of types of segments, such as music ortalk segments, news segments, weather segments, sports segments, trafficsegments, segments purchased by other parties (e.g., advertisements), orany other type of segment.

When an electronic device determines that a particular media item orsegment is not of interest to the user, the electronic device canseamlessly transfer the media playback from the media stream having theundesirable media item to a desirable media item retrieved from a locallibrary. For example, the electronic device can direct audio playbackcircuitry to switch the audio source from the received broadcast to amedia item stored in memory. The electronic device can select anysuitable media item for playback, including for example a media itemrelated to the media stream (e.g., to ensure that the media items playedback remain coherent). In some embodiments, the electronic device canuse a specialized algorithm applied to one or more recently played backmedia item of interest of the media stream to identify a related mediaitem from the local library to play back.

The electronic device can switch back from local media to the mediastream at any suitable time. For example, the electronic device canmonitor the broadcast stream to determine when a desirable media item isbroadcast again, and switch to the media stream in response to detectinga desirable media item. If the local media item playback is not completewhen a desirable broadcast media item is detected, the electronic devicecan record or buffer the media broadcast and switch to the broadcaststream when playback of the local media item ends. The electronic devicecan play back from the buffered media broadcast, and jump back to thelive broadcast at any suitable time, including for example if playbackof a buffered media item ends as a desirable media item is broadcast.

As used in this application, the term media item will be understood toinclude any audio or video that can be broadcast by a content source andreceived by an electronic device for playback. For example, a media itemcan include music (e.g., a song), a talk show segment, an advertisement,news programming, a podcast, videos, or any other media content that maybe provided to a user. In addition, it will be understood thatembodiments described in the context of a radio broadcast by a radiostation can also be provided using any type of media broadcast by anymedia or content source over any suitable communications network. Also,it will be understood that while some embodiments may be described inthe context of switching between broadcast and local media items, theembodiments can also be implemented by switching between broadcast andlocal segments, or combinations of segments and media items.

FIG. 1 is a representation of an illustrative user device 100 that is inaccordance with some embodiments of the present invention. User device100 may generally be any device that can receive radio stations. Forexample, in some embodiments, user device 100 can internally have aradio tuner. In other embodiments, user device 100 can have thenecessary ports to be coupled to an external radio tuner. User device100 can then receive radio signals through the external radio tuner. Forexample, user device 100 can be a handheld radio, a car radio, acellular phone, a personal data assistant (PDA), a handheld digitalmusic player such as an iPod™ (available from Apple Inc. of Cupertino,Calif.), or a laptop or notebook computer. Although user device 100 isgenerally depicted as a handheld device in FIG. 1, user device 100 canalso be a non-handheld device such as a desktop computer.

User device 100 can include main device 102 and one or more accessorydevices 104. Generally, any of the components of user device 100described below can be integrated into main device 102, contained inaccessory device 104, or both. For example, as discussed above, a radiotuner can be integrated into accessory device 104 or integrated directlyinside main device 102. Additionally, although accessory device 104 isdepicted as being physically coupled to main device 102 in FIG. 1,accessory device 104 may alternatively be wirelessly coupled to maindevice 102.

In some embodiments, user device 100 can include display screen 106.Further to the discussion above, display screen 106 does not need to beintegrated into main device 102, and in other embodiments can be anaccessory device that is physically or wirelessly coupled to main device102. Display screen 106 can include any suitable screen, such as atelevision screen, a computer monitor, a projection screen, a liquidcrystal display (LCD) screen, or an organic light-emitting diode (OLED)screen. Display screen 106 can present various types of information tothe user such as graphical and/or textual displays. This can include,for example, user-selectable options, radio station playlists, musicplaylists, stored videos, stored photos, stored data, and systeminformation. In some embodiments, display screen 106 can function as auser input mechanism that allows for a touch screen or user input via atouch input (e.g., from actual or near contact of a user's finger or ofa tool with the screen).

User device 100 can also include one or more of user input mechanisms108 and 110. These mechanisms can be, for example, a keyboard, buttons,switches, track wheels, or click wheels. User device 100 can include oneor more of port 112 for coupling external data and/or hard drives intouser device 100. For example, port 112 can enable user device 100 toreceive SIM cards, flash drives, or external hard drives. There can bemultiple ways of connecting accessories devices through, for example,connector 114. Persons skilled in the art will appreciate that connector114 can be any suitable connector such as one or more USB ports, 30-pinconnector ports, dock or expansion ports, and headset jacks.

User device 100 can also include user input/output devices such asmicrophone 114 and speakers 116. Although depicted as being contained inaccessory device 104, one skilled in the art would appreciate thatmicrophone 114 and speakers 116 may alternatively or additionally becontained in main device 102.

FIG. 2 is a schematic view of an illustrative electronic device coupledto a host device in accordance with some embodiments of the invention.For example, electronic device 200 can correspond to user device 100 ofFIG. 1. Electronic device 200 can include control circuitry 202, storage204, memory 206, input/output circuitry 208, and radio tuner circuitry210. In some embodiments, one or more of the components of electronicdevice 200 can be combined or omitted (e.g., combine storage 204 andmemory 206). In some embodiments, electronic device 200 can includeother components not combined or included in those shown in FIG. 2(e.g., motion detection components, a power supply such as a battery, ora bus), or several instances of the components shown in FIG. 2. For thesake of simplicity, only one of each of the components is shown in FIG.2.

Control circuitry 202 can include any processing circuitry or processoroperative to control the operations and performance of electronic device200. For example, control circuitry 202 can be used to run operatingsystem applications, firmware applications, media playback applications,radio tuner applications, or any other application. In some embodiments,the control circuitry can drive a display and process inputs receivedfrom a user interface.

Storage 204 can include, for example, one or more storage mediumsincluding a hard-drive, solid state drive, flash memory, permanentmemory such as ROM, any other suitable type of storage component, or anycombination thereof. Storage 204 can store, for example, media data(e.g., music and video files), application data (e.g., for implementingfunctions on device 200), firmware, user preference information data(e.g., radio preset preferences), authentication information (e.g.libraries of data associated with authorized users), wireless connectioninformation data (e.g., information that can enable electronic device200 to establish a wireless connection), and any other suitable data orany combination thereof.

Memory 206 can include cache memory, semi-permanent memory such as RAM,and/or one or more different types of memory used for temporarilystoring data. In some embodiments, memory 206 can also be used forstoring data used to operate electronic device applications, or anyother type of data that can be stored in storage 204. In someembodiments, memory 206 and storage 204 can be combined as a singlestorage medium.

Input/output circuitry 208 can be operative to convert (andencode/decode, if necessary) analog signals and other signals intodigital data. In some embodiments, input/output circuitry 208 can alsoconvert digital data into any other type of signal, and vice-versa.Although input/output circuitry 208 is illustrated in FIG. 2 as a singlecomponent of electronic device 200, several instances of input/outputcircuitry can be included in electronic device 200.

Radio tuner circuitry 210 can include any suitable circuitry for tuningto a particular frequency of a received radio signal. For example, byresonating at a particular frequency, radio tuner circuitry 210 can passthat particular frequency and exclude any other frequencies that werereceived with the radio signal. Radio tuner circuitry can communicatewith input/output circuitry 208 to audibly output the particularfrequency through, for example, speakers 116 of FIG. 1. In someembodiments, the electronic device can instead or in addition includecommunications circuitry operative to connect to other types of contentsources using different types of communications networks, such ascommunications circuitry for connecting to satellite radio stations,Internet radio stations, dedicated broadcast sources (e.g., on-demandcontent sources), or any other suitable content source. For the sake ofbrevity, it will be understood that any suitable content source and anycommunications network can be used instead of or in addition to a radiostation and a radio network in the following discussion.

In some embodiments, electronic device 200 can include a bus operativeto provide a data transfer path for transferring data to, from, orbetween control processor 202, storage 204, memory 206, input/outputcircuitry 208, radio tuner circuitry 210, and any other componentincluded in the electronic device.

Electronic device 200 can be coupled to host device 230 viacommunications path 232. Host device 230 can include any suitable typeof device operative to provide power, data (e.g., media files) or bothto electronic device 200. For example, host device 230 may include acomputer (e.g., a desktop or laptop computer), a server (e.g., a serveravailable over the Internet or using a dedicated communications link), akiosk, or any other suitable device. In some embodiments, host device230 can include a remote server, for example accessible over theInternet. Host device 230 can include any suitable communicationscircuitry for communication with electronic device over communicationspath 232.

Communications path 232 can be provided by any suitable communicationscircuitry operative to connect to a communications network and totransmit communications (e.g., voice or data) from electronic device 200to host device 230, or other devices within a communications network.Communications path 232 can support any suitable communications protocolsuch as, for example, Wi-Fi (e.g., a 802.11 protocol), Bluetooth(registered trademark), radio frequency systems (e.g., 900 MHz, 1.4 GHz,and 5.6 GHz communication systems), infrared, GSM, GSM plus EDGE, CDMA,quadband, and other cellular protocols, VOIP, or any other suitableprotocol. In some embodiments, communications path 232 may be operativeto receive media or data over the Internet (e.g., streaming media ordownloaded media).

The electronic device can receive media streams from a variety ofsources. In some embodiments, the electronic device can receive a radiostream. FIG. 3 is a schematic view of an illustrative system forproviding and receiving radio broadcasts in accordance with oneembodiment of the invention. System 300 can include one or moreelectronic devices 302 operative to receive radio station broadcasts,although only one is shown in FIG. 3 for simplicity. Each electronicdevice 302 can include radio tuner circuitry 304 operative to tune toand receive a radio broadcast. Radio station 310 can provide broadcast312 of media using, for example, a AM or FM radio signal, for anyelectronic device 302 within the broadcast range of radio station 310.In addition to the media, radio station 310 can broadcast radio stationinformation such as Radio Data System (RDS) information. RDS informationcan include, for example, digital information such as stationidentification, the current song's track, artist, genre, and lengthinformation, and/or alternative frequencies for particular stations.

Each media broadcast to which the electronic device can tune can includeseveral media items or segments. Each media item or segment can becharacterized by distinct metadata, such as genre, artist, title, albummetadata for music; host, guest, topic for talk segments; type, sponsorfor a weather, news, or advertisement segment. Each user can havedifferent tastes, and like or dislike different media items or segmentsof a particular media broadcast. As a the media items or segments of amedia broadcast change, the user's interest in the broadcast can alsochange. To ensure that a user only consumes media items or segments thatare of interest to the user, the electronic device can monitor thebroadcast media items and segments, and switch playback from undesirableor disliked media items and segments to locally stored or locallyavailable media items or segments that the user likes.

The electronic device can identify a user's interests using any suitableapproach. In some embodiments, the electronic device can define oraccess a preference profile defining a user's interests and dislikes.The preference profile can include any suitable information, includingfor example specific metadata describing attributes of media items orsegments, listings of particular media items or segments, or any otherinformation identifying media items or characteristics of media items orsegments. The preference profile can include information describing oneor both of media items or segments that a user likes and that a userdislikes.

The preference profile can be generated using any suitable approach. Insome embodiments, the electronic device or another device can direct theuser to respond to a series of questions from which the device canidentify the user's preferences. Alternatively, the electronic devicecan monitor the user's playback history to identify the type of mediaitems or segments to which the user listens (e.g., both broadcast andlocally stored media items or segments) or that the user skips or tunesaway from. As still another example, the electronic device candetermine, from the media items or segments locally stored or availablefrom a host device, specific media items or the types of media items ofinterest to the user.

The electronic device can identify a broadcast media item or segmentusing any suitable approach. For example, the electronic device canmonitor each radio station and retrieve data describing each broadcastmedia item (e.g., identified from an analysis of the broadcast audio, orfrom metadata broadcast with the media, such as RDS, RT or RT+ data). Asanother example, the electronic device can access a remote database thatincludes a listing of the media items broadcast or to be broadcast byparticular radio stations. The remote database can be provided byindividual radio stations, or generated and managed by a specializedentity. As still another example, the electronic device can identifymedia items provided by a radio station from alternative sources of theradio broadcast, such as a counterpart Internet radio station of aterrestrial or Internet radio station. The electronic device can monitorthe alternative source, or alternatively retrieve listings of broadcastmedia items from the alternative source (e.g., retrieve from the pastten songs broadcast from a radio station website, or determine futureguests on a talk show program from a website schedule).

When the electronic device determines, after comparing an upcoming mediaitem or segment with the user's preference profile, that the upcomingmedia item or segment is not of interest to the user, the electronicdevice can select a different media item from the electronic devicelibrary for playback. Although the following discussion will describeswitching to a media item in a local library, it will be understood thatthe electronic device can instead or in addition switch to a unicaststream from a host device or server, or any other non-broadcast mediaitem or segment.

The electronic device can play back any suitable number of local mediaitems or segments after switching from a media broadcast. In someembodiments, the electronic device can continue to monitor the mediabroadcast from which the device switched to determine whether thebroadcast includes a media item or segment that is of interest to theuser. For example, the electronic device can monitor RDS data providedby the radio station and received by the radio tuning circuitry as abackground process to determine whether the next media item is ofinterest. Because RDS data can be received within a window (e.g., a 10second window) of the beginning of a media item, the electronic devicecan instead or in addition analyze the received audio stream to detectchanges in tempo, pauses, a DJ voice, or other characteristic elementsthat separate consecutive media items or segments. The electronic devicecan then return to the media broadcast as soon as the subsequent mediaitem is of interest. In some cases, the electronic device may berequired to play back several locally stored media items or segmentsbefore identifying a broadcast media item that is of interest (e.g., ifthere is a long pause between consecutive talk show segments).

To avoid switching away from locally played back media in the middle ofthe media playback, the electronic device can instead determine whether,after playing back a local media item, the current media item of themedia broadcast is of interest to the user. If it is, the electronicdevice can then return to the media broadcast. This, however, can causethe electronic device to switch to the media broadcast in the middle ofthe broadcast media item playback. To avoid this, the electronic devicecan determine, after a local media item ends, whether the currentbroadcast media item is both of interest to the user and whetherplayback is at or near (e.g., within 5 or 10 seconds) of the beginningof the media item. If the current broadcast media item is either not ofinterest, or that the playback is not at or near the beginning of themedia item, the electronic device can continue to play back media itemsfrom a local library.

In some embodiments, to avoid switching away from locally played backmedia in the middle of the media playback, the electronic device caninstead monitor the media stream for a media item or segment ofinterest, and record the stream in response to detecting the media itemor segment (e.g., buffer the media broadcast). Then, when the locallyplayed back media item ends, the electronic device can switch playbackto the media broadcast buffer while continuing to record the mediabroadcast. The electronic device buffer can have any suitable length,including for example a length that ensures that a user can easilyswitch between locally stored media and broadcast media without riskingmissing broadcast media of interest. As another example, the bufferlength can be selected based on power or memory considerations. In oneimplementation, the buffer can support recording a particular durationof a media broadcast at a given bitrate using a given CODEC, for exampletwo hours using an average bitrate and CODEC.

The electronic device can manage the buffer content using any suitableapproach. In particular, the electronic device can determine whichcontent to place in the buffer, and which content to remove from thebuffer when the buffer becomes full. In some embodiments, the buffer caninclude a circular buffer in which the memory assigned to consumed mediaitems can be released to store upcoming media items from the mediabroadcast. If a user does not play back the buffered media over aduration that is within a predetermined distance (e.g., a time or amountof remaining memory) of the end of the buffer, the electronic device maymanage the specific media items within the buffer.

In some embodiments, the electronic device can stop recording thebroadcast media stream when the buffer is full. This can ensure, forexample, that the user can listen to the media that was broadcast whenthe device first switched away from the media broadcast (e.g., if theuser switched away because of an advertisement). Alternatively, theelectronic device can replace the oldest portions of the media broadcastwith more recent portions of the broadcast (e.g., treat the buffer as acircular buffer for all received broadcast media).

In some embodiments, the electronic device can instead or in additionanalyze the contents of the buffer and of the received broadcast stream,and selectively remove content from the buffer, selectively storebroadcast media items in the buffer, or both. For example, when themedia buffer reaches a predetermined length or a predetermined distancefrom the buffer end, the electronic device can analyze the media itemsreceived from the media broadcast, and determine whether the receiveditems are of interest to the user. The electronic device can thenselectively buffer only the received media items that are of interest.As another example, the electronic device can analyze the media itemsstored in the buffer, and identify the stored media items that are ofless interest to the user. The electronic device can then selectivelyrelease the memory taken by those media items, and allow newly receivedbroadcast media items to replace the less desirable buffered mediaitems. As still another example, the electronic device can only replacemedia items stored in the buffer that are less desirable than particulardesirable media items from the received media broadcast.

The electronic device can use any suitable approach to ensure that themedia items played back from the local library are related to the mediabroadcast. For example, the electronic device can analyze one or more ofthe last items of interest that were played back as part of the mediabroadcast, can select local media items that are related to those mediaitems (e.g., using an algorithm that measures the proximity betweenmedia items). In some embodiments, the electronic device can identifyrelated local media items based on metadata of the broadcast media itemsof interest (e.g., select media items that have the same artist, genre,or year as the broadcast media items). In some embodiments, theelectronic device an instead or in addition retrieve and use valuesdefining the proximity between two or more media items.

Proximity values can be determined using any suitable approach. In someembodiments, they can be determined by comparing the specific mediaitems in a large number of libraries or playlists. For example, each ofa large number of electronic device can identify, from metadataassociated with each media item, the available media items stored inmemory or stored on a host device from which the electronic devicereceives media (e.g., a computer to which a portable media device iscoupled). In some embodiments, the electronic device can provide thecatalogued information to a remote server that receives and processesinformation defining the media libraries of several electronic devices.The remote server can then determine the overlap of specific media itemsor attributes in different libraries or playlists, and assign aproximity value for each of the media items.

The algorithm can use any suitable attribute of the media items withinthe libraries to determine the proximity value. For example, thealgorithm can consider metadata attributes of the media items (e.g.,artist and genre). As another example, the algorithm can process mediaitems based on the libraries in which they were found. In particular,the algorithm can identify, for each media item in a particular library,the other media items within the same library. The algorithm can inaddition process user-generated playlists that include a subset of mediaitems from a library. Because single users typically listen to mediahaving some similarity within a single playlist, or own media items thatcan be categorized in one or more groupings, the algorithm can predictthe similarity of media items without processing the attributes of themedia items (e.g., define similarity without verifying that the definedgenre is the same).

When the electronic device or remote server processes a large number ofplaylists and libraries provided by a large number of users or distinctelectronic devices, the electronic device or remote server can identifyoverlaps in libraries and playlists, and thus determine which sets ofmedia items are most related. In particular, the electronic device canidentify groupings, clusters or “buckets” of media items that arecommonly found in distinct libraries or playlists (e.g., buckets ofrelated media items). Using the buckets, the electronic device canidentify the particular media items of a media broadcast that areassociated with buckets having at least a predetermined number oflocally stored media items to determine whether a broadcast media itemis of interest to the user. For example, only broadcast media items thatare in a bucket having at least a particular number (e.g., absolutenumber such as 0, 5 or 10, percentage of local media items such as 1%,5%, or 20%, or percentage of media bucket items such as 0.1%, 10%, or40%) of local media items can be considered of interest. As anotherexample, only broadcast media items that are associated with at leastone of a predetermined number of the most common buckets associated withlocal media items can be considered of interest to the user. In someembodiments, the electronic device can define buckets based only onseveral playlists defined for the local media library (e.g., ifinformation from other electronic devices is not available).

The following flowcharts describe illustrative processes for use inidentifying radio stations of interest. FIG. 4 is a flowchart of anillustrative process for seamlessly switching from broadcast media tolocal media in accordance with one embodiment of the invention. Process400 can begin at step 402. At step 404, the electronic device canreceive broadcast media. For example, the electronic device can directcommunications circuitry to tune to a media broadcast provided by amedia source (e.g., a radio broadcast). At step 406, the electronicdevice can identify an upcoming media item or segment of the receivedmedia broadcast. For example, the electronic device can monitor RDS dataor data retrieved from a remote source, for the identity of one or moreof the upcoming media items or segments. In some embodiments, theelectronic device can receive information identifying specific mediaitems, or instead or in addition metadata associated with specific mediaitems or segments. At step 408, the electronic device can determinewhether the identified upcoming media item is of interest to the user.For example, the electronic device can compare the identified upcomingmedia item or attributes of the upcoming media item with a userpreference profile. As another example, the electronic device candetermine how related or close the upcoming media item is to media itemsin the user's library. If the electronic device determines that theidentified upcoming media item is of interest to the user, process 400can move to step 410.

At step 410, the electronic device can play back the media stream andthe upcoming media item. Process 400 can then return to step 406 andcontinue to identify upcoming media items in the media broadcast. If, atstep 408, the electronic device instead determines that the identifiedupcoming media item is not of interest to the user, process 400 can moveto step 412. At step 412, the electronic device can identify a mediaitem of interest to the user in the local library. For example, theelectronic device can identify a media item or segment from the user'slocal library (e.g., locally stored media items or media items availablefrom a host device in communication with the electronic device) that isrelated to one or more of the recent broadcast media items that were ofinterest to the user. In some embodiments, the electronic device canapply an algorithm measuring the proximity of different media items toselect a local media item that is particularly relevant or related toprevious broadcast media items. At step 414, the electronic device canplay back the identified local media item. For example, the electronicdevice can switch the playback from the media stream to the local media.In some embodiments, the electronic device can seamlessly switchplayback to the local media item such that the user does not realizethat the source of the media output of the device has changed (e.g., nouser input is required to change the source of media). Process 400 canthen end at step 416.

FIG. 5 is a flowchart of an illustrative process for switching mediaplayback from local media to a media broadcast in accordance with oneembodiment of the invention. Process 500 can begin at step 502. At step504, the electronic device can play back a local media item. Forexample, the electronic device can play back a media item or segmentfrom a locally stored media library, or from a host device with whichthe electronic device can create a communications path. At step 506, theelectronic device can monitor a media broadcast of interest to the user.For example, the electronic device can monitor a media broadcast fromwhich the electronic device switched (e.g., using process 400, FIG. 4).As another example, the electronic device can monitor a media broadcastthat was identified as being of interest to the user (e.g., from apreference profile associated with the user). At step 508, theelectronic device can determine whether an upcoming media item of themonitored media broadcast is of interest to the user. For example, theelectronic device can monitor RDS data, or data retrieved from a remotesource, for the identity of one or more of the upcoming media items orsegments. In some embodiments, the electronic device can receiveinformation identifying specific media items, or instead or in additionmetadata associated with specific media items or segments. Theelectronic device can determine whether the identified upcoming mediaitem is of interest to the user using any suitable approach, includingfor example by comparing the identified upcoming media item orattributes of the upcoming media item with a user preference profile. Asanother example, the electronic device can determine how related orclose the upcoming media item is to media items in the user's library.If the electronic device determines that the upcoming media item is notof interest to the user, process 500 can return to step 506 and continueto monitor the media broadcast.

If, at step 510, the electronic device instead determines that theupcoming media item is of interest to the user, process 500 can move tostep 512. At step 512, the electronic device can buffer the mediabroadcast. For example, the electronic device can store in memory (e.g.,in a buffer) the received media broadcast. The buffer can have anysuitable length, including for example a length that is sufficientlylarge for storing several broadcast media items or segments. In someembodiments, the electronic device can manage the media buffer to ensurethat proper media items from the broadcast are stored in the buffer. Atstep 512, the electronic device can determine whether the playback ofthe local media item is over. For example, the electronic device candetermine whether the playhead has reached the end of the media item. Ifthe electronic device determines that the local media item is not over,process 500 can return to step 510 and continue to buffer the mediastream.

If, at step 512, the electronic device determines that playback of thelocal media item has completed, process 500 can move to step 514. Atstep 514, the electronic device can switch playback from the local mediato the media broadcast buffer. This can ensure that the user does notmiss any relevant portion of the media broadcast, while providing amechanism for switching the source of played back media. In someembodiments, the electronic device can continue to buffer the mediastream as the electronic device plays back from the buffer. Theelectronic device can automatically and seamlessly switch the playbacksource such that the user may not realize that the playback source haschanged. Process 500 can then end at step 516.

The above described embodiments of the present invention are presentedfor purposes of illustration and not of limitation, and the presentinvention is limited only by the claims which follow.

1. A method for seamlessly switching between a media broadcast and mediafrom a local library, comprising: directing communications circuitry toreceive a media broadcast, wherein the media broadcast comprises aplurality of media items; sequentially playing back the media items fromthe received media broadcast; determining that an upcoming media item ofthe media broadcast is not of interest to the user; identifying a mediaitem from the local library that is of interest to the user; andautomatically seamlessly switching playback from the media broadcast tothe identified media item from the local library in response todetermining that the upcoming media item of the media broadcast is notof interest to the user.
 2. The method of claim 1, further comprising:receiving, from a media source, a listing of the plurality of mediaitems.
 3. The method of claim 1, further comprising: extracting metadataindicative of the plurality of media items from the received mediabroadcast; and establishing at least one of the identity and attributesof the upcoming media item.
 4. The method of claim 3, whereindetermining further comprises: retrieving a user preference profile; andapplying the retrieved preference profile to the established at leastone of the identity and attributes of the upcoming media item todetermine whether the upcoming media item is of interest to the user. 5.The method of claim 4, wherein determining further comprises:identifying media items from the local library; and determining that theupcoming media item does not match a media item from the local library.6. The method of claim 3, wherein identifying further comprises:retrieving a user preference profile; and applying the retrievedpreference profile to media items from the local library to identify amedia item from the local library that is of interest to the user. 7.The method of claim 6, further comprising: selecting a played back mediaitem of interest from the plurality of media items; retrieving ameasurement of the relatedness of media items from the local libraryrelative to the selected media item of interest; and identifying a mediaitem from the local library that has a measurement of relatedness thatsatisfies a proximity criteria.
 8. An electronic device operative toswitch between different sources of audio for playback, comprising radiotuning circuitry, memory, and a processor, the processor operative to:direct the radio tuning circuitry to tune to a radio broadcast;determine that an upcoming radio broadcast segment is not of interest toa user; identify a played back radio broadcast segment that was ofinterest to the user; select a media item locally stored in the memorythat is related to the identified radio broadcast segment; andautomatically switch playback from the radio broadcast to the selectedmedia item in response to determining that the upcoming media item ofthe media broadcast is not of interest to the user.
 9. The electronicdevice of claim 8, wherein the processor is further operative to:determine that a subsequent radio broadcast segment is of interest tothe user; and direct the memory to store the subsequent radio broadcastsegment in a buffer.
 10. The electronic device of claim 9, wherein theprocessor is further operative to: detect that playback of the selectedmedia item has ended; and automatically switch playback from theselected media item to the subsequent radio broadcast segment stored inthe buffer.
 11. The electronic device of claim 10, wherein the processoris further operative to: determine that several radio broadcast segmentsare stored in the buffer; determine that one of the several radiobroadcast segments stored in the buffer is not of interest to the user;and skip the one of the several radio broadcast segments stored in thebuffer when playing back from the buffer.
 12. The electronic device ofclaim 11, wherein the processor is further operative to: detect anupcoming new segment of the radio broadcast; determine that the user hasmore interest in the detected upcoming new broadcast segment than in theseveral radio broadcast segments stored in the buffer; and automaticallyswitch playback from the buffer to the radio broadcast.
 13. Theelectronic device of claim 8, wherein the processor is further operativeto: detect that playback of the selected media item has ended; selectanother media item locally stored in the memory; and play back the otherselected media item.
 14. A method for seamlessly switching betweenbroadcast and local sources for media playback, comprising: receiving amedia broadcast; determining that a media item of the media broadcast isnot of interest to a user; identifying a previously played back mediaitem of the media broadcast that is of interest to the user; selecting amedia item locally stored in memory of the electronic device, whereinthe selected media item is similar to the identified previously playedback media item; and playing back the selected media item instead of thedetermined broadcast media item when the determined broadcast media itemis transmitted as part of the media broadcast.
 15. The method of claim14, wherein selecting further comprises: receiving a plurality ofpre-defined clusters of media items; identifying one of the plurality ofpre-defined clusters associated with the previously played back mediaitem; and determining that the media item locally stored in memory iswithin the identified one of the plurality of pre-defined clusters. 16.The method of claim 15, wherein determining that a media item of themedia broadcast is not of interest to the user further comprises:identifying all of the plurality of pre-defined clusters of media itemsassociated with the media item; and determining that less than apre-determined amount of media items locally stored in memory are in anyof the identified all of the plurality of pre-defined clusters.
 17. Themethod of claim 16, wherein determining that less than a predeterminedamount of media items further comprises determining that no media itemslocally stored in memory are in any of the identified all of theplurality of predefined clusters.
 18. The method of claim 14, furthercomprising: determining that a subsequent media item of the mediabroadcast is of interest to the user; and automatically switchingplayback from the media item locally stored in memory to the subsequentmedia item of the media broadcast.
 19. A computer-readable media forseamlessly switching between broadcast and local sources for mediaplayback, the computer-readable media comprising computer-readableinstructions recorded thereon for: receiving a media broadcast;determining that a media item of the media broadcast is not of interestto a user; identifying a previously played back media item of the mediabroadcast that is of interest to the user; selecting a media itemlocally stored in memory of an electronic device, wherein the selectedmedia item is similar to the identified previously played back mediaitem; and playing back the selected media item instead of the determinedbroadcast media item when the determined broadcast media item istransmitted as part of the media broadcast in response to determiningthat the media item of the media broadcast is not of interest to a user.20. The computer readable media of claim 19, wherein thecomputer-readable media comprises additional computer-readableinstructions recorded thereon for: determining that a subsequent mediaitem of the media broadcast is of interest to the user; andautomatically switching playback from the selected media item to thesubsequent media item of the media broadcast.
 21. The computer readablemedia of claim 20, wherein the computer-readable media comprisesadditional computer-readable instructions recorded thereon for: storingthe subsequent media items of the broadcast media in a buffer; andautomatically switching playback to the subsequent media items stored inthe buffer.